package com.molichuxing.services.infrastructure.service;

import com.molichuxing.framework.service.RootService;
import com.molichuxing.services.infrastructure.dto.response.GoodsDealerDto;

import java.util.List;
import java.util.Map;

/**
 * 单服务 商品分销
 * @author xuelin yi
 */
public interface GoodsDealerService  extends RootService {

    /**
     * 删除商品和经销商的授权关系
     * @param goodsId
     * @return
     */
    public Boolean deleteGoodsDealer(int goodsId);

    /**
     * 删除商品和经销商的授权关系
     * @param dealerId
     * @return
     */
    public Boolean deleteGoodsDealerByDealer(int dealerId);

    /**
     * 根据商品ID查询分销商数量
     * @param goodsId
     * @return
     */
    public int getDealerCountByGoodsId(int goodsId);

    /**
     * 查询经销商下商品数量
     * @param goodsIds
     * @param dealerId
     * @return
     */
    public int getGoodsCount(List<Integer> goodsIds, Integer dealerId);

    /**
     * 根据经销商id集合查询商品信息
     * @param dealerIds
     * @return
     */
    public Map<Integer, List<GoodsDealerDto>> getGoodsCountByDealerId(List<Integer> dealerIds);

}
